<template>
<view class="">
	<!-- <view class="search_address">
		<view class="title">
			通讯录
		</view>
		<view class="search_input">
			<input type="text" value="" placeholder="搜索" />
		</view>
	</view> -->
	<view class="address_list" :style="{height: ht-20 + 'px'}">
		<view class="address_item">
			<view class="address_content">
				<view class="contentList" >
					<image src="../../static/icon/icon-31.png" mode=""></image>
					<view class="content_text">
						宜家管家
					</view>
				</view>
			</view>
		</view>
		<view class="address_item" v-for="(item,index) in addressList" :key="index">
			<view class="address_title">
				{{item.title}}
			</view>
			<view class="address_content">
				<view class="contentList" v-for="(it,ind) in item.contentList" 
				@click="contact(it.id)"
				:key="ind">
					<image :src=it.pic mode=""></image>
					<view class="content_text">
						{{it.name}}
					</view>
				</view>
			</view>
			
		</view>
		<view class="address_aside">
			<view class="aside_list" v-for="(item,index) in addressList" :key="index">
				{{item.title}}
			</view>
		</view>
		<cover-view v-if="visiable" id="tk" :style="{height: ht + 'px'}">
			<view class="bottomBox">
				<view class="boxItem">
					他的房源
				</view>
				<view class="boxItem">
					联系他
				</view>
				<view class="boxItem">
					发消息
				</view>
			</view>
		</cover-view>
	</view>
</view>
</template>

<script>
	export default{
		data(){
			return{
				ht:'',
				addressList:[
					{
						title:'A',
						contentList:[
							{
								id:1,
								pic:'../../static/icon/icon-31.png',
								name:'好友A'
							},
							{
								id:2,
								pic:'../../static/icon/icon-31.png',
								name:'好友B'
							}
						]
					},
					{
						title:'B',
						contentList:[
							{
								id:3,
								pic:'../../static/icon/icon-31.png',
								name:'好友A'
							},
							{
								id:4,
								pic:'../../static/icon/icon-31.png',
								name:'好友B'
							}
						]
					}
				],
				visiable: false
			}
		},
		mounted() {
			this.getH()
		},
		methods:{
			getH(){
				const { windowWidth, windowHeight } = uni.getSystemInfoSync();	
				this.ht = windowHeight
				console.log(windowHeight)
			},
			contact(id){
				this.visiable = true
				console.log(id)
			}
		}
	}
</script>

<style>
	.search_address{
		
	}
	.search_address .title{
		width: 100%;
		height: 90upx;
		background: #4F5861;
		color: white;
		text-align: center;
		line-height: 90upx;
	}
	.search_input{
		width: 100%;
		height: 90upx;
		background: white;
	}
	.search_input input{
		margin:20upx auto;
		width: 700upx;
		height: 60upx;
		background: #ECEDEE;
		border-radius: 10upx;
		text-align: center;
		line-height: 60px;
	}
	.address_list{
		overflow: hidden;
		position: relative;
		padding-top: 40upx;
		background: white;
	}
	.address_item{
		width: 100%;
	}
	.address_item .address_title{
		width: 100%;
		height: 60upx;
		padding-left: 20upx;
		color: #AAAAAA;
		font-size: 28upx;
		line-height: 60upx;
		background: #F8F8FA;
	}
	.address_item .address_content{
		width: 100%;
		
	}
	.address_item .address_content .contentList{
		display: flex;
		height: 110upx;
		background: white;
	}
	.address_item .address_content .contentList image{
		margin: 15upx 0 0 40upx;
		width: 80upx;
		height: 80upx;
	}
	.address_item .address_content .content_text{
		width: 630upx;
		margin-left: 20upx;
		color: #000000;
		font-weight: bold;
		font-size: 30upx;
		line-height: 110upx;
		border-bottom: solid 1px rgba(245,245,245,0.8);
	}
	.address_aside{
		position: absolute;
		right: 10upx;
		top: 23%;
	}
	.address_aside .aside_list{
		margin-top: 10upx;
		font-size: 22upx;
		line-height: 30upx;
	}
	
	#tk{
		position: absolute;
		left: 0;
		top: 0;
		width: 100%;
		height: 222upx;
		background: rgba(0,0,0,.1);
	}
	.bottomBox{
		position: absolute;
		left: 0;
		bottom: 0;
		width: 100%;
	}
	.bottomBox .boxItem{
		width: 100%;
		height: 110upx;
		background: white;
		text-align: center;
		line-height: 110upx;
		border-bottom: solid 1px rgba(245,245,245,.7);
	}
</style>
